# -*- coding: utf-8 -*-

from aeConn import dbHandle
from compound import Compound

import yaml

def subStructSearch(fingerprint):

	params = {}
	print fingerprint

	body = yaml.dump(fingerprint)

	resp = dbHandle.postAction('subStructSearch', body, params)

	data = yaml.load(resp)
	
	compounds = [Compound(key) for key in data]

	return compounds

def searchReactions(filters):
	pass